<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>医生端布局</title>
		<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
	</head>
	<style type="text/css">
		
		*{
			margin: 0;
			padding: 0;
		}
		.container{
			display: grid;
		}
		.head{
			display: grid;
			grid-template-columns: 270px auto 100px;
			grid-template-rows: 70px;
			background-color: #009F95;
		}
		.menu,.exit{
			display: grid;
			background-color: #0e61a0;
			justify-items: center;
			align-items: center;
			cursor: pointer;
		}
		.logo{
			display: grid;
			background-color: #0677cd;
			grid-template-columns: 60px 700px auto 50px; 
			align-items: center;
			
		}
		.logo_png{
			width: 100px;
			padding: 10px;
		}
		.system_name{
			font-size: 30px;
			color: white;
			padding: 15px;
		}
		.search{
			position: relative;
		}
		#search{
			border: none;
			opacity: 0.5;
			width: 300px;
			padding: 10px 10px 10px 22px;
			border-radius: 5px;
			background-color: #D3D4D3;
		}
		.search_png::after{
			content: "";
			background: url(../img/search.png);
			background-repeat: no-repeat;
			width: 20px;
			height: 16px;
			position: absolute;
			left: 3px;
			top: 10px;
		}
		.section{
			display: grid;
			grid-template-columns: 270px auto;
			grid-template-rows: 600px;
			grid-gap: 1px;
		}
		.nav{
			display: grid;
			grid-gap: 1px;
			grid-template-columns: 270px;
			grid-template-rows:1px calc(20vh) calc(70vh);
		}
		.blank{
			background-color: white;
		}
		.Doc_photo{
			display: grid;
			background-color: #0677CD;
			align-items: center;
			justify-items: center;
			font-size: 20px;
			color: white;
		}
		.meau_list{
			display: grid;
			background-color: #0e61a0;
			text-align: center;
		}
		.func{
			padding: 40px 0 0 0 ;
		}
		.func>li{
			padding: 10px;
			list-style: none;
		}
		.func>li>a{
			text-decoration: none;
			font-size: 20px;
			color: white;
		}
		.main{
			background-color: white;
		}
		li:hover{
			background-color: #f4a117;
			/* display: block; */
		}
		.basic_info{
			cursor: pointer;
			text-decoration: none;
			color: white;
		}
		.aa{
			background-color: #f4a117;
		}
	</style>
	<body>
		<div class="container">
			<!-- 头部 -->
			<div class="head">
				<div class="menu" id="meau"><img src="../img/meau.png" ></div>
				<div class="logo">
					<div class="logo_png">
						<img src="../img/logo.png" width="50px">
					</div>
					<div class="system_name">
						<span>家庭医生签约管理系统</span>
					</div>
					<div class="search">
						<span class="search_png"></span>
						<input type="text" name="" id="search" value="" placeholder="Search"/>
					</div>
					<div class="notice">
						<img src="../img/notice.png">
					</div>
				</div>
				<div class="exit"><img src="../img/exit.png" ></div>
			</div>
			<!-- 头部以下 -->
			<div class="section">
				<!-- 左侧导航 -->
				<div class="nav" id="nav">
					<div class="blank"></div>
					<div class="Doc_photo">
						<img src="../img/logo.png" >
						<a class="basic_info" target="main" href="Doc_basic_info.html"><span id="docname"></span>医生<img src="../img/right.svg"></a>
						<span id="docWork"></span>
					</div>
					<div class="meau_list">
						<ul class="func">
							<li><a href="my_patient.html" target="main" class="">已签合约</a></li>
							<li><a href="new_contract.html" target="main" class="new_contract">新增合约</a></li>
							<li><a href="Doc_chat.html" target="main" class="">在线问诊</a></li>
							<li><a href="serve_info.html" target="main" class="">服务信息</a></li>
							<li><a href="add_info.html" target="main" class="">完善信息</a></li>
							<li><a href="my_Team.html" target="main" class="">我的团队</a></li>
							<li><a href="establish_group.html" target="main" class="">建立团队</a></li>
							<li><a href="Doc_change_pass.html" target="main" class="">更改密码</a></li>
							<li><a href="Pat_health_manager.html" target="main" class="">档案管理</a></li>
						</ul>
					</div>
				</div>
				<!-- 主体部分 -->
				<div class="main" id="main">
					<iframe src="" width="100%" height="100%" name="main"></iframe>
				</div>
				
			</div>
		</div>
	</body>
	<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/layui/lay/modules/layer.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		
		window.onload=function(){
			//$("#docname").text("张二狗");
			var k =JSON.stringify({
				phone :localStorage.getItem("FDSMS")
			});
			$.ajax({
				url : "http://123.56.67.48:8080/getName",
				method : "POST",
				contentType:'application/json',
				data:k,
				success:function(res){
					console.log(res);
					var vk = JSON.parse(res);
					if(vk.code == 1){
						$("#docname").text(vk.name);
						if(vk.work == "Team_manager_Doc"){
							$("#docWork").text("团队长");
						} else {
							$(".new_contract").attr("href","javascript:alert(\"没有权限同意合约，请等待队长同意\")");
						}
					}
				},
				error : function(res){
					alert("姓名获取失败");
				}
			})
		}
		
		var Isshow = false;
		$(document).ready(function(){
		  $("#meau").click(function(){
				if(!Isshow){
					$("#nav").toggle();
					$("#main").width(window.innerWidth);
					Isshow = true;
				} 
				else if(Isshow){
					$("#nav").toggle();
					$("#main").width(window.innerWidth-260);
					isshow = false;
				}
		  });
		});

		$(".exit").click(function(){
			if(confirm("你确定退出吗？") == true){
				localStorage.removeItem("FDSMS");
				window.location.href="../login.html";
			}
		})
		
		$("li").click(function(){
		  $(this).addClass("aa").siblings().removeClass("aa");
		})
	</script>
</html>
